//
//  ButtonFiveCollectionViewCell.m
//  WWAVPlayer
//
//  Created by dllo on 15/10/31.
//  Copyright © 2015年 LZY. All rights reserved.
//

#import "ButtonFiveCollectionViewCell.h"

@implementation ButtonFiveCollectionViewCell

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.buttonNameLabel = [[UILabel alloc] init];
        self.buttonNameLabel.font = [UIFont systemFontOfSize:15];
        self.buttonNameLabel.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:self.buttonNameLabel];
        
        self.photoImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:_photoImageView];
        
    }
    return self;
}
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    self.photoImageView.frame = CGRectMake(10, 10, self.contentView.bounds.size.width - 20 , self.contentView.bounds.size.width -20 );
    self.buttonNameLabel.frame = CGRectMake(5, self.contentView.bounds.size.width , self.contentView.bounds.size.width - 10, 20);
}
@end
